<template>
  <el-dialog
    :visible.sync="visible"
    :before-close="beforeClose"
    :close-on-click-modal="false"
    append-to-body
    class="dialog-sm"
    top="30px"
    width="800px"
  >
    <base-view
      v-bind="$attrs"
      @success="handleSuccess"
      @close="beforeClose"
      :view-mode="false"
    ></base-view>
  </el-dialog>
</template>

<script>
import BaseView from '@/gov/views/bus/import/xinnong/components/Base'
export default {
  components: {
    BaseView,
  },
  props: {
    visible: Boolean,
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
    handleSuccess() {
      this.$emit('success', true)
      this.beforeClose()
    },
  },
}
</script>

<style lang="scss" scoped></style>
